package io.github.kuafucv.zero.log.core.context;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;

public class ZeroLogContext {

    private static final BlockingQueue<String> JSON_LOG_QUEUE = new ArrayBlockingQueue<>(1024);

    public static void offerJsonLog(String jsonLog) {
        JSON_LOG_QUEUE.offer(jsonLog);
    }

    public static String takeJsonLog() throws InterruptedException {
        return JSON_LOG_QUEUE.take();
    }

}
